package com.zhaodi.mybatisflexdemo.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.activerecord.Model;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.FieldNameConstants;

import javax.crypto.KeyGenerator;
import java.io.Serial;

/**
 * @ClassName TbUser
 * @Description TODO
 * @Author 郭敖
 * @Date 2024年07月04日 15:47
 * @Version 1.0
 */

@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("tb_user")
@FieldNameConstants
@Accessors(chain = true)
public class TbUser extends Model<TbUser> {
    @Serial
    private static final long serialVersionUID = -4057713740750384316L;
    @Id(keyType = KeyType.Generator,value = KeyGenerators.snowFlakeId)
    private Integer id;
    @Column("realName")
    private String realName;
    private String password;
    private String phone;
    @Column("nickName")
    private String nickName;
    private Integer integral;
    private String address;
    private String salt;
    private Integer state;
}
